<template>
  <view>
    <view>{{ count }}</view>
    <view @tap="incr">+++</view>
  </view>
</template>

<script>
import { mapState } from "vuex";
export default {
  data() {
    return {};
  },
  computed: {
    /* num() {
      return this.$store.state.count;
    }, */
    ...mapState(["count"]),
  },
  methods: {
    incr() {
      this.$store.dispatch("incr", 2);
    },
  },
};
</script>

<style lang="scss" scope>
</style>
